package com.hmdp.utils;

/**
 * @author guozh
 */
public interface ILock {
    /**
     * 尝试获取锁
     * @param timeoutSec 超时时
     * @return 获取锁成功返回true，获取锁失败返回false
     */
    boolean tryLock(long timeoutSec);

    /**
     * 释放锁
     */
    void unLock();
}
